package com.huitone.smspfm.dao.oracle;

import java.util.List;

import org.springframework.jdbc.core.BeanPropertyRowMapper;

import com.huitone.smspfm.context.utils.ContextUtils;
import com.huitone.smspfm.dao.oracle.entity.PriAlloc;

public class PriAllocDao extends BaseDao<PriAlloc> {

	@Override
	public List<PriAlloc> getAllObj() {
		
		PriRuleDefDao bean = ContextUtils.getInstance().getBean(PriRuleDefDao.class);
		
		return jdbcTemplate.query("SELECT a.*, b.\"LEVEL\" FROM " + tableName + " a LEFT JOIN " + bean.getTableName() + " b ON a.RULE_ID = b.RULE_ID", new BeanPropertyRowMapper<PriAlloc>(PriAlloc.class));
	}

}
